﻿@model Comercio.Models.DBM.tb_producto

@{
    ViewBag.Title = "Editar";
}

<h2>Editar producto </h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>tb_producto</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.id_categoria, "tb_categoria")
        </div>
        <div class="editor-field">
            @Html.DropDownList("id_categoria", String.Empty)
            @Html.ValidationMessageFor(model => model.id_categoria)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.descripcion)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.descripcion)
            @Html.ValidationMessageFor(model => model.descripcion)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.precio)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.precio)
            @Html.ValidationMessageFor(model => model.precio)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.nombre)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.nombre)
            @Html.ValidationMessageFor(model => model.nombre)
        </div>

        <p>
            <input type="submit" value="Actualizar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Volver", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
